package homeWork.day3;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
/**
 * 使用Date输出当前系统时间，以及3天后这一刻的时间
 * @author Bonnie
 *
 */
public class Test01 {
    public static void main(String[] args) {
        Date date = new Date();
        SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        System.out.println(ft.format(date));
        Calendar c = Calendar.getInstance();
        c.add(Calendar.DATE,3);
        System.out.println(c.get(Calendar.YEAR)+"-"+(c.get(Calendar.MONTH)+1)+"-"+ c.get(Calendar.DATE)+ " "
                + c.get(Calendar.HOUR_OF_DAY)+":"+ Character.getDirectionality(Calendar.MINUTE)+":"
                +c.get(Calendar.SECOND));

    }

}
